package com.model;

// Generated 15 f�vr. 2013 15:56:26 by Hibernate Tools 4.0.0

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * EquipeEmploye generated by hbm2java
 */
@Entity
@Table(name = "EquipeEmploye", schema = "dbo", catalog = "CRM")
public class EquipeEmploye implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private EquipeEmployeId id;
	private Employe employeByEmploye;
	private Employe employeByEquipeId;
	private Date dateArrivee;
	private Date dateDepart;

	public EquipeEmploye() {
	}

	public EquipeEmploye(EquipeEmployeId id, Employe employeByEmploye,
			Employe employeByEquipeId) {
		this.id = id;
		this.employeByEmploye = employeByEmploye;
		this.employeByEquipeId = employeByEquipeId;
	}

	public EquipeEmploye(EquipeEmployeId id, Employe employeByEmploye,
			Employe employeByEquipeId, Date dateArrivee, Date dateDepart) {
		this.id = id;
		this.employeByEmploye = employeByEmploye;
		this.employeByEquipeId = employeByEquipeId;
		this.dateArrivee = dateArrivee;
		this.dateDepart = dateDepart;
	}

	@EmbeddedId
	@AttributeOverrides({
			@AttributeOverride(name = "equipeId", column = @Column(name = "equipeId", nullable = false)),
			@AttributeOverride(name = "employe", column = @Column(name = "employe", nullable = false)) })
	public EquipeEmployeId getId() {
		return this.id;
	}

	public void setId(EquipeEmployeId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "employe", nullable = false, insertable = false, updatable = false)
	public Employe getEmployeByEmploye() {
		return this.employeByEmploye;
	}

	public void setEmployeByEmploye(Employe employeByEmploye) {
		this.employeByEmploye = employeByEmploye;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "equipeId", nullable = false, insertable = false, updatable = false)
	public Employe getEmployeByEquipeId() {
		return this.employeByEquipeId;
	}

	public void setEmployeByEquipeId(Employe employeByEquipeId) {
		this.employeByEquipeId = employeByEquipeId;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "dateArrivee", length = 23)
	public Date getDateArrivee() {
		return this.dateArrivee;
	}

	public void setDateArrivee(Date dateArrivee) {
		this.dateArrivee = dateArrivee;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "dateDepart", length = 23)
	public Date getDateDepart() {
		return this.dateDepart;
	}

	public void setDateDepart(Date dateDepart) {
		this.dateDepart = dateDepart;
	}

}
